<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>权限管理——角色管理</title>
</head>
<link href="/pages/common/layui/css/layui.css" rel="stylesheet" media="all">

<style>
	.xm-select-parent .xm-select--suffix input {
		height: 38px;
	}
	.xm-select-parent .xm-select {
		min-height: 38px;
	}
</style>
<body>
	<div class="layui-row">
		<div class="layui-col-md1">&nbsp;</div>
		<input id="pageCount" type="" name="" style="display: none">
		<div id="roleList" class="layui-col-md10" style="background: #fff">
			<div id="user_table" class="layui-card" style="margin-top: 1%">
				<div class="layui-card-header"><p id="title">角色管理</p></div>
				<div class="layui-card-body" id="roleTable_list">
					<table id="user_list" lay-filter="user_list" style="table-layout:fixed;word-break:break-all;" >

					</table>
				</div>
			</div>

			<script type="text/html" id="toolbarUsers">
				<div class="layui-btn-container">
					<button class="layui-btn layui-btn-sm role1-add" onclick="Manage.addRole()">添加角色</button>
				</div>
			</script>

			<!--操作-->
			<script type="text/html" id="userListBar">
				{{#  if(d.roleName == '普通管理员' || d.roleName == '公众号' || d.roleName == '游客' || d.roleName == '机器人' || d.roleName == '财务' || d.roleName == '客服'  ){ }}
				<a class="layui-btn layui-btn-danger layui-btn-xs delete role1-delete layui-btn-disabled" disabled>删除</a>
				{{#  }else{  }}
				<a class="layui-btn layui-btn-danger layui-btn-xs delete role1-delete" lay-event="delete">删除</a>
				{{#  } }}

				<a class="layui-btn layui-btn-primary layui-btn-xs update role1-update" lay-event="update">修改</a>
				<a class="layui-btn layui-btn-primary layui-btn-xs resource role1-resource" lay-event="resource">定义权限</a>
				<a class="layui-btn layui-btn-primary layui-btn-xs query" lay-event="query">查看用户</a>
			</script>

			<input id="userList_limlt" value="15" type="hidden">


			<!-- 添加角色操作 -->
			<form class="layui-form" id="add_role" style="display:none;">

				<div class="layui-form-item">
					<label class="layui-form-label">角色名称</label>
					<div class="layui-input-block">
						<input type="text"  id="roleName" placeholder="请输入角色名称" lay-verify="required" autocomplete="off" class="layui-input">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">角色描述</label>
					<div class="layui-input-block">
						<input type="text"  id="roleDesc" placeholder="请输入角色描述信息" lay-verify="required" autocomplete="off" class="layui-input">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">角色状态</label>
					<div class="layui-input-block">
						<select id="roleStatus"  name="selects" >
							<option value="">请选择角色状态</option>
							<option value="1">使用</option>
							<option value=-1>禁用</option>
						</select>
					</div>
				</div>


				<div class="layui-form-item">
					<div class="layui-input-block" style="">
						<a class="layui-btn" id="role_from_add" style="margin-bottom: 10px;">确认添加</a>
						<a class="layui-btn layui-btn-primary back" style="margin-bottom: 10px;">返回</a>
					</div>
				</div>
			</form>


			<!-- 修改角色操作 -->
			<form id="update_role" style="display:none;">

				<div class="layui-form-item">
					<label class="layui-form-label">编号</label>
					<div class="layui-input-block">
						<input type="text"  id="roleIdUpdate" readonly placeholder="请输入角色名称" lay-verify="required" autocomplete="off" class="layui-input">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">名称</label>
					<div class="layui-input-block">
						<input type="text"  id="roleNameUpdate" placeholder="请输入角色名称" lay-verify="required" autocomplete="off" class="layui-input" readonly>
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">描述</label>
					<div class="layui-input-block">
						<input type="text"  id="roleDescUpdate" placeholder="请输入角色描述信息" lay-verify="required" autocomplete="off" class="layui-input">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">状态</label>
					<div class="layui-input-block">
						<select id="roleStatusUpdate" name="roleStatusUpdate" style="height: 39px;width: 17%;border: 1px solid;border-color: #D2D2D2!important;">
							<option value="">请选择角色状态</option>
							<option value="1">使用</option>
							<option value="-1">禁用</option>
						</select>
					</div>
				</div>

				<div class="layui-form-item">
					<div class="layui-input-block" style="">
						<a class="layui-btn" id="role_from_update" style="margin-bottom: 10px;">确认修改</a>
						<a class="layui-btn layui-btn-primary back" style="margin-bottom: 10px;">返回</a>
					</div>
				</div>
			</form>

			<!-- 详情角色操作 -->
			<form class="layui-form" id="desc_role" style="display:none;">

				<div class="layui-form-item">
					<label class="layui-form-label">角色名称</label>
					<div class="layui-input-block">
						<input type="text"  id="roleNameDesc" readonly lay-verify="required" autocomplete="off" class="layui-input">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">角色描述</label>
					<div class="layui-input-block">
						<input type="text"  id="roleDescDesc" readonly  lay-verify="required" autocomplete="off" class="layui-input">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">角色状态</label>
					<div class="layui-input-block">
						<select id="roleStatusDesc" readonly name="selects" >
							<option value="">请选择角色状态</option>
							<option value="1">使用</option>
							<option value="-1">禁用</option>
						</select>
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">分配权限</label>
					<div class="layui-input-block">
						<select name="select1" readonly xm-select="select1">
							<option value="">请选择角色状态</option>
							<!--<option value="1">北京</option>-->
						</select>
					</div>
				</div>

				<div class="layui-form-item">
					<div class="layui-input-block" style="">
						<a class="layui-btn layui-btn-primary back" style="margin-bottom: 10px;">返回</a>
					</div>
				</div>
			</form>

		</div>
	</div>
<script type="text/javascript" src="/pages/common/jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="/pages/console/assets/xss-filters.1.2.7.min.js"></script>
<script type="text/javascript" src="/pages/common/layui/layui.all.js"></script>
<script type="text/javascript" src="/pages/assets/js/jquery.md5.js"></script>
<script type="text/javascript" src="/pages/console/js/common.js"></script>
<script type="text/javascript" src="./js/console_ui.js"></script>
<script type="text/javascript" src="/pages/console/js/authorityManagement.js"></script>
<script type="text/javascript" src="/pages/console/js/roleManage.js"></script>

</body>
</html>